<template>
  <div>
    <GameSelectorButton @selectGame="selectGame" v-for="(item, index) in gameButtons" :key="'button-'+index" :button="item"></GameSelectorButton>
  </div>
</template>

<script>
import GameSelectorButton from "@/components/home/components/GameSelectorButton";

export default {
  name: "GameSelector",
  components:{
    GameSelectorButton,
  },
  data(){
    return{
      gameButtons:[
        {
          title: "欢乐斗地主",
          id: 1,
          imgSrc: '/logo.jpeg'
        },
        {
          title: "疯狂打飞机",
          id: 2,
          imgSrc: 'https://www.baidu.com/img/flexible/logo/pc/result.png'
        }
      ]
    }
  },
  methods:{
    selectGame(id){
      this.$emit("selectGame", id, false);
    }
  }
}
</script>

<style scoped>

</style>
